<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::get('/test', function (\Illuminate\Http\Request $request) {
//    $a = ["foo"=>1, "bar"=>2, "foo_bar"=>3, "foobar"=>4];
//    $b = \App\Http\Services\ToolsManager::ASCII($a);
//    var_dump($b);
//    $a = \App\Http\Services\SyncData::getGoodsStock();
//    $a = \App\Http\Controllers\Api\SyncController::syncStockByGoodsDetail(2);
    $orderId = $request->get("order_id");
    $a = \App\Http\Controllers\Api\SyncController::syncAddOrder($orderId);
    return response()->json(['level' => 'success','message' => '获取成功','data' => $a]);
//    var_dump($a);
});

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/

Route::group(['middleware' => ['web']], function () {

    Route::get('menu',['as' => 'Home.Page.menu', 'uses' => 'HomeController@menu']);
    Route::get('content',['as' => 'Home.Page.content', 'uses' => 'HomeController@content']);

//    Route::group(['prefix'=>'admin'],function(){
//        Route::get('login',['as' => 'Admin.Home.login', 'uses' => 'AdminController@login']);
//        Route::get('user-list',['as' => 'Admin.Home.userList', 'uses' => 'AdminController@userList']);
//        Route::get('banner-list',['as' => 'Admin.Home.bannerList', 'uses' => 'AdminController@bannerList']);
//        Route::get('banner-set',['as' => 'Admin.Home.bannerSet', 'uses' => 'AdminController@bannerSet']);
//        Route::get('change-Pwd',['as' => 'Admin.Home.changePwd', 'uses' => 'AdminController@changePwd']);
//        Route::get('admin-list',['as' => 'Admin.Home.adminList' , 'uses' => 'AdminController@adminList']);
//        Route::get('admin-set',['as' => 'Admin.Home.adminSet' , 'uses' => 'AdminController@adminSet']);
//        Route::get('classify-list',['as' => 'Admin.Home.classifyList' , 'uses' => 'AdminController@classifyList']);
//
//
//    });
    Route::group(['prefix'=>'admin'],function(){
        Route::get('login',['as' => 'Admin.Home.login', 'uses' => 'AdminController@login']);
        Route::get('user-list',['as' => 'Admin.Home.userList', 'uses' => 'AdminController@userList']);
        Route::get('banner-list',['as' => 'Admin.Home.bannerList', 'uses' => 'AdminController@bannerList']);
        Route::get('banner-set',['as' => 'Admin.Home.bannerSet', 'uses' => 'AdminController@bannerSet']);
        Route::get('section-list',['as' => 'Admin.Home.sectionList', 'uses' => 'AdminController@sectionList']);
        Route::get('section-set',['as' => 'Admin.Home.sectionSet', 'uses' => 'AdminController@sectionSet']);
        Route::get('banner-nav-list',['as' => 'Admin.Home.bannerNavList', 'uses' => 'AdminController@bannerNavList']);
        Route::get('banner-nav-set',['as' => 'Admin.Home.bannerNavSet', 'uses' => 'AdminController@bannerNavSet']);
        Route::get('advert-img-list',['as' => 'Admin.Home.advertImgList', 'uses' => 'AdminController@advertImgList']);
        Route::get('advert-img-set',['as' => 'Admin.Home.advertImgSet', 'uses' => 'AdminController@advertImgSet']);
        Route::get('change-Pwd',['as' => 'Admin.Home.changePwd', 'uses' => 'AdminController@changePwd']);
        Route::get('admin-list',['as' => 'Admin.Home.adminList' , 'uses' => 'AdminController@adminList']);
        Route::get('admin-set',['as' => 'Admin.Home.adminSet' , 'uses' => 'AdminController@adminSet']);
        Route::get('classify-list',['as' => 'Admin.Home.classifyList' , 'uses' => 'AdminController@classifyList']);
        Route::get('goods-service-label-list',['as' => 'Admin.Home.goodsServiceLabelList' , 'uses' => 'AdminController@goodsServiceLabelList']);
        Route::get('goods-list',['as' => 'Admin.Home.goodsList' , 'uses' => 'AdminController@goodsList']);
        Route::get('goods-banner-list',['as' => 'Admin.Home.goodsBannerList' , 'uses' => 'AdminController@goodsBannerList']);
        Route::get('goods-img-list',['as' => 'Admin.Home.goodsImgList' , 'uses' => 'AdminController@goodsImgList']);
        Route::get('goods-set',['as' => 'Admin.Home.goodsSet' , 'uses' => 'AdminController@goodsSet']);
        Route::get('orders-list',['as' => 'Admin.Home.ordersList' , 'uses' => 'AdminController@ordersList']);
        Route::get('orders-details-list',['as' => 'Admin.Home.ordersDetails' , 'uses' => 'AdminController@ordersDetails']);
        Route::get('write-ship-info-list',['as' => 'Admin.Home.writeShipInfo' , 'uses' => 'AdminController@writeShipInfo']);
        Route::get('goods-comment-list',['as' => 'Admin.Home.goodsCommentList' , 'uses' => 'AdminController@goodsCommentList']);
        Route::get('goods-comment-set',['as' => 'Admin.Home.goodsCommentSet' , 'uses' => 'AdminController@goodsCommentSet']);
        Route::get('goods-comment-img-list',['as' => 'Admin.Home.goodsCommentImgList' , 'uses' => 'AdminController@goodsCommentImgList']);
        Route::get('coupons-list',['as' => 'Admin.Home.couponsList' , 'uses' => 'AdminController@couponsList']);
        Route::get('coupons-set',['as' => 'Admin.Home.couponsSet' , 'uses' => 'AdminController@couponsSet']);
        Route::get('goods-integral-list',['as' => 'Admin.Home.goodsIntegralList' , 'uses' => 'AdminController@goodsIntegralList']);
        Route::get('goods-integral-set',['as' => 'Admin.Home.goodsIntegralSet' , 'uses' => 'AdminController@goodsIntegralSet']);
        Route::get('express-company-list',['as' => 'Admin.Home.expressCompanyList' , 'uses' => 'AdminController@expressCompanyList']);
        Route::get('goods-spu-list',['as' => 'Admin.Home.goodsSpuList' , 'uses' => 'AdminController@goodsSpuList']);
        Route::get('goods-spu-set',['as' => 'Admin.Home.goodsSpuSet' , 'uses' => 'AdminController@goodsSpuSet']);
        Route::get('user-integral-list',['as' => 'Admin.Home.userIntegralList' , 'uses' => 'AdminController@userIntegralList']);
        Route::get('qrcode-list',['as' => 'Admin.Home.qrCodeList' , 'uses' => 'AdminController@qrCodeList']);
        Route::get('qrcode-set',['as' => 'Admin.Home.qrCodSet' , 'uses' => 'AdminController@qrCodSet']);
        Route::get('game-rank',['as' => 'Admin.Home.gameRank' , 'uses' => 'AdminController@gameRank']);
        Route::get('bargain-list',['as' => 'Admin.Home.bargainList' , 'uses' => 'AdminController@bargainList']);
        Route::get('bargain-set',['as' => 'Admin.Home.bargainSet' , 'uses' => 'AdminController@bargainSet']);
        Route::get('user-bargain-initiate-list',['as' => 'Admin.Home.userBargainInitiateList' , 'uses' => 'AdminController@userBargainInitiateList']);
        Route::get('user-bargain-initiate-detail',['as' => 'Admin.Home.userBargainInitiateDetail' , 'uses' => 'AdminController@userBargainInitiateDetail']);
        Route::get('user-bargain-join-list',['as' => 'Admin.Home.userBargainJoinList' , 'uses' => 'AdminController@userBargainJoinList']);
        Route::get('group-list',['as' => 'Admin.Home.groupList' , 'uses' => 'AdminController@groupList']);
        Route::get('group-set',['as' => 'Admin.Home.groupSet' , 'uses' => 'AdminController@groupSet']);
        Route::get('group-add-list',['as' => 'Admin.Home.groupAddList' , 'uses' => 'AdminController@groupAddList']);
        Route::get('group-add-member-list',['as' => 'Admin.Home.groupAddMemberList' , 'uses' => 'AdminController@groupAddMemberList']);
        Route::get('group-add-detail',['as' => 'Admin.Home.groupAddDetail' , 'uses' => 'AdminController@groupAddDetail']);
        Route::get('group-add-member-detail',['as' => 'Admin.Home.groupAddMemberDetail' , 'uses' => 'AdminController@groupAddMemberDetail']);
        Route::get('group-goods-spu-list',['as' => 'Admin.Home.groupGoodsSpuList' , 'uses' => 'AdminController@groupGoodsSpuList']);
        Route::get('group-goods-spu-set',['as' => 'Admin.Home.groupGoodsSpuSet' , 'uses' => 'AdminController@groupGoodsSpuSet']);
        Route::get('coupons-list',['as' => 'Admin.Home.couponsList' , 'uses' => 'AdminController@couponsList']);
        Route::get('coupons-set',['as' => 'Admin.Home.couponsSet' , 'uses' => 'AdminController@couponsSet']);
        Route::get('discountList',['as' => 'Admin.Home.discountList' , 'uses' => 'AdminController@discountList']);
        Route::get('vipUserList',['as' => 'Admin.Home.vipUserList' , 'uses' => 'AdminController@vipUserList']);
        Route::get('downLoadExcel',['as' => 'Admin.Home.downLoadExcel' , 'uses' => 'AdminController@downLoadExcel']);
        Route::get('setDiscountSales',['as' => 'Admin.Home.setDiscountSales' , 'uses' => 'AdminController@setDiscountSales']);
        Route::get('discountSalesList',['as' => 'Admin.Home.discountSalesList' , 'uses' => 'AdminController@discountSalesList']);
        Route::get('getExpressBladeList',['as' => 'Admin.Home.getExpressBladeList' , 'uses' => 'AdminController@getExpressBladeList']);
        Route::get('getExpressCustomList',['as' => 'Admin.Home.getExpressCustomList' , 'uses' => 'AdminController@getExpressCustomList']);
        Route::get('getOrderRefundApply',['as' => 'Admin.Home.getOrderRefundApply' , 'uses' => 'AdminController@getOrderRefundApply']);
        Route::get('getUserChargeRecord',['as' => 'Admin.Home.getUserChargeRecord' , 'uses' => 'AdminController@getUserChargeRecord']);
        Route::get('shop-list',['as' => 'Admin.Home.shopList', 'uses' => 'AdminController@shopList']);
        Route::get('shop-set',['as' => 'Admin.Home.shopSet', 'uses' => 'AdminController@shopSet']);

    });

    Route::group(['prefix'=>'api', 'namespace'=>'Api','middleware' => ['cors']],function(){

        Route::group(['prefix' => 'admin','namespace'=>'Admin'],function(){
            Route::post('auth/sign-in',['as'=>'Api.Admin.Auth.signInAdmin','uses'=>'AuthController@signInAdmin']);
            Route::post('auth/change-pwd',['as'=>'Api.Admin.Auth.changePassword','uses'=>'AuthController@changePassword']);
            Route::get('auth/signOut',['as'=>'Api.Admin.Auth.signOut','uses'=>'AuthController@signOutAdmin']);
            Route::post('sys/setBanner',['as'=>'Api.Admin.sys.setBanner','uses'=>'SystemController@setBanner']);
            Route::post('sys/setBannerNav',['as'=>'Api.Admin.sys.setBannerNav','uses'=>'SystemController@setBannerNav']);
            Route::post('sys/delBanner',['as'=>'Api.Admin.sys.delBanner','uses'=>'SystemController@delBanner']);
            Route::post('sys/delBannerNav',['as'=>'Api.Admin.sys.delBannerNav','uses'=>'SystemController@delBannerNav']);
            Route::post('sys/setAdvertImg',['as'=>'Api.Admin.sys.setAdvertImg','uses'=>'SystemController@setAdvertImg']);
            Route::post('sys/delAdvertImg',['as'=>'Api.Admin.sys.delAdvertImg','uses'=>'SystemController@delAdvertImg']);
            Route::post('sys/setAdmin',['as' => 'Api.Admin.sys.setAdmin','uses' => 'SystemController@setAdmin']);
            Route::post('sys/delAdmin',['as'=>'Api.Admin.sys.delAdmin','uses'=>'SystemController@delAdmin']);
            Route::post('sys/addClassify',['as'=>'Api.Admin.sys.addClassify','uses'=>'SystemController@addClassify']);
            Route::post('sys/delClassify',['as'=>'Api.Admin.sys.delClassify','uses'=>'SystemController@delClassify']);
            Route::post('sys/setGoodsServiceLabel',['as'=>'Api.Admin.sys.setGoodsServiceLabel','uses'=>'SystemController@setGoodsServiceLabel']);
            Route::post('sys/delGoodsServiceLabel',['as'=>'Api.Admin.sys.delGoodsServiceLabel','uses'=>'SystemController@delGoodsServiceLabel']);

            Route::post('goods/setComment',['as'=>'Api.Admin.goods.setComment','uses'=>'GoodsController@setComment']);
            Route::post('goods/setCommentImg',['as'=>'Api.Admin.goods.setCommentImg','uses'=>'GoodsController@setCommentImg']);
            Route::post('sys/getChildClassify',['as' => 'Api.Admin.sys.getChildClassify','uses' => 'SystemController@getChildClassify']);
            Route::post('goods/setGoods',['as'=>'Api.Admin.goods.setGoods','uses'=>'GoodsController@setGoods']);
            Route::post('goods/delGoods',['as'=>'Api.Admin.goods.delGoods','uses'=>'GoodsController@delGoods']);
            Route::post('goods/setGoodsImg',['as'=>'Api.Admin.goods.setGoodsImg','uses'=>'GoodsController@setGoodsImg']);
            Route::post('goods/delGoodsImg',['as'=>'Api.Admin.goods.delGoodsImg','uses'=>'GoodsController@delGoodsImg']);
            Route::post('goods/setGoodsBanner',['as'=>'Api.Admin.goods.setGoodsBanner','uses'=>'GoodsController@setGoodsBanner']);
            Route::post('goods/delGoodsBanner',['as'=>'Api.Admin.goods.delGoodsBanner','uses'=>'GoodsController@delGoodsBanner']);
            Route::post('goods/delGoodsComment',['as'=>'Api.Admin.goods.delGoodsComment','uses'=>'GoodsController@delGoodsComment']);
            Route::post('goods/setGoodsComment',['as'=>'Api.Admin.goods.setGoodsComment','uses'=>'GoodsController@setGoodsComment']);
            Route::post('goods/delGoodsCommentImg',['as'=>'Api.Admin.goods.delGoodsCommentImg','uses'=>'GoodsController@delGoodsCommentImg']);
            Route::post('goods/setGoodsSpu',['as'=>'Api.Admin.goods.setGoodsSpu','uses'=>'GoodsController@setGoodsSpu']);
            Route::post('goods/delGoodsSpu',['as'=>'Api.Admin.goods.delGoodsSpu','uses'=>'GoodsController@delGoodsSpu']);
            Route::post('goods/addGoodsSpuArray',['as'=>'Api.Admin.goods.addGoodsSpuArray','uses'=>'GoodsController@addGoodsSpuArray']);
            Route::post('order/changeOrderStatus',['as'=>'Api.Admin.order.changeOrderStatus','uses'=>'OrderController@changeOrderStatus']);
            Route::post('order/setShipInfo',['as'=>'Api.Admin.order.setShipInfo','uses'=>'OrderController@setShipInfo']);
            Route::post('order/reSetOrderAmount',['as'=>'Api.Admin.order.reSetOrderAmount','uses'=>'OrderController@reSetOrderAmount']);
            Route::post('order/setOrderRefund',['as'=>'Api.Admin.order.setOrderRefund','uses'=>'OrderController@setOrderRefund']);
            Route::post('sys/setCoupons',['as'=>'Api.Admin.sys.setCoupons','uses'=>'SystemController@setCoupons']);
            Route::post('sys/delCoupons',['as'=>'Api.Admin.sys.delCoupons','uses'=>'SystemController@delCoupons']);
            Route::post('sys/setExpressCompany',['as'=>'Api.Admin.sys.setExpressCompany','uses'=>'SystemController@setExpressCompany']);
            Route::post('sys/delExpressCompany',['as'=>'Api.Admin.sys.delExpressCompany','uses'=>'SystemController@delExpressCompany']);
            Route::post('sys/setExpressUse',['as'=>'Api.Admin.sys.setExpressUse','uses'=>'SystemController@setExpressUse']);
            Route::post('sys/setQrCode',['as'=>'Api.Admin.sys.setQrCode','uses'=>'SystemController@setQrCode']);
            Route::post('sys/delQrCode',['as'=>'Api.Admin.sys.delQrCode','uses'=>'SystemController@delQrCode']);
            Route::post('sys/test',['as'=>'Api.Admin.sys.test','uses'=>'SystemController@test']);
            Route::get('getUserToken',['as'=>'Api.Admin.User.getUserToken','uses'=>'UserController@getUserToken']);
            Route::post('activity/setActivityBargain',['as'=>'Api.Admin.activity.setActivityBargain','uses'=>'ActivityController@setActivityBargain']);
            Route::post('activity/delActivityBargain',['as'=>'Api.Admin.activity.delActivityBargain','uses'=>'ActivityController@delActivityBargain']);

            Route::post('activity/setActivityGroup',['as'=>'Api.Admin.activity.setActivityGroup','uses'=>'ActivityController@setActivityGroup']);
            Route::post('activity/delActivityGroup',['as'=>'Api.Admin.activity.delActivityGroup','uses'=>'ActivityController@delActivityGroup']);
            Route::post('sys/setCoupons',['as'=>'Api.Admin.sys.setCoupons','uses'=>'SystemController@setCoupons']);
            Route::post('sys/delCoupons',['as'=>'Api.Admin.sys.delCoupons','uses'=>'SystemController@delCoupons']);
            Route::post('sys/addChargeRecord',['as'=>'Api.Admin.sys.addChargeRecord','uses'=>'SystemController@addChargeRecord']);
            Route::post('sys/addDiscountRule',['as'=>'Api.Admin.sys.addDiscountRule','uses'=>'SystemController@addDiscountRule']);
            Route::post('sys/setUserDiscount',['as'=>'Api.Admin.sys.setUserDiscount','uses'=>'SystemController@setUserDiscount']);
            Route::post('sys/setDiscountSalesRule',['as'=>'Api.Admin.sys.setDiscountSalesRule','uses'=>'SystemController@setDiscountSalesRule']);
            Route::post('sys/setReturnAddress',['as'=>'Api.Admin.sys.setReturnAddress','uses'=>'SystemController@setReturnAddress']);
            Route::post('trim',['as'=>'Api.Admin.trim','uses'=>'GoodsController@trim']);//规格去空格

            Route::post('sys/setExpressCustomFee',['as'=>'Api.Admin.sys.setExpressCustomFee','uses'=>'SystemController@setExpressCustomFee']);
            Route::post('sys/setExpressBlade',['as'=>'Api.Admin.sys.setExpressBlade','uses'=>'SystemController@setExpressBlade']);
            Route::post('sys/delExpressCustomFee',['as'=>'Api.Admin.sys.delExpressCustomFee','uses'=>'SystemController@delExpressCustomFee']);
            Route::post('sys/delExpressBlade',['as'=>'Api.Admin.sys.delExpressBlade','uses'=>'SystemController@delExpressBlade']);

            Route::post('sys/setShop',['as'=>'Api.Admin.sys.setShop','uses'=>'SystemController@setShop']);
            Route::post('sys/delShop',['as'=>'Api.Admin.sys.delShop','uses'=>'SystemController@delShop']);

        });

        Route::group(['prefix' => 'wx'],function(){
            Route::any('getJsApiPacket',['as'=>'Api.Wechat.getJsApiPacket','uses'=>'WechatController@getJsApiPacket']);
        });

        Route::group(['prefix' => 'file'],function(){
            Route::post('upload-img',['as'=>'Api.File.upload','uses'=>'ImageController@upload']);
            Route::post('upload-audio',['as'=>'Api.File.uploadAudio','uses'=>'ImageController@uploadAudio']);
            Route::post('upload-video',['as'=>'Api.File.uploadVideo','uses'=>'ImageController@uploadVideo']);
            Route::get('show-image/{id}',['as'=>'Api.File.showImageById','uses'=>'ImageController@showImageById']);
            Route::get('show-video/{id}',['as'=>'Api.File.showVideoById','uses'=>'ImageController@showVideoById']);
            Route::get('reloadImages',['as'=>'Api.File.reloadImages','uses'=>'ImageController@reloadImages']);
            Route::post('uploadBase64Image',['as'=>'Api.File.uploadBase64Image','uses'=>'ImageController@uploadBase64Image']);
            Route::post('upload-user-photo',['as'=>'Api.File.uploadUserPhoto','uses'=>'ImageController@uploadUserPhoto']);
        });

        Route::group(['prefix' => 'audio'],function(){
            Route::get('upload-audio/{audio_id}',['as'=>'Api.Audio.getAudioUrl','uses'=>'AudioController@getAudioUrl']);
       });

        Route::group(['prefix' => 'auth'],function(){
            Route::get('loginByOpenId',['as'=>'Api.Auth.loginByOpenId','uses'=>'AuthController@loginByOpenId']);
            Route::get('wxLogin',['as'=>'Api.Auth.wxLogin','uses'=>'AuthController@wxLogin']);
            Route::get('goToUrl',['as'=>'Api.Auth.goToUrl','uses'=>'AuthController@goToUrl']);
            Route::any('wechatCallback',['as'=>'Api.Auth.wechatCallback','uses'=>'AuthController@wechatCallback']);
            Route::post('wxAppLogin',['as'=>'Api.Auth.wxAppLogin','uses'=>'AuthController@wxAppLogin']);
            Route::post('sendVerificationCode',['as'=>'Api.Auth.sendVerificationCode','uses'=>'AuthController@sendVerificationCode']);
            Route::post('bindingPhone',['as'=>'Api.Auth.bindingPhone','uses'=>'AuthController@bindingPhone']);
            Route::get('getUserToken/{id?}',['as'=>'Api.Auth.getUserToken','uses'=>'AuthController@getUserToken']);
            Route::post('getWeChatPhone',['as'=>'Api.Auth.getWeChatPhone','uses'=>'AuthController@getWeChatPhone']);
            Route::post('resetSessionKey',['as'=>'Api.Auth.resetSessionKey','uses'=>'AuthController@resetSessionKey']);
            Route::post('directBindingPhone',['as'=>'Api.Auth.directBindingPhone','uses'=>'AuthController@directBindingPhone']);

        });

        Route::group(['prefix' => 'other'],function(){
            Route::get('getBannerList',['as'=>'Api.Order.getBannerList','uses'=>'OtherController@getBannerList']);
            Route::get('getExpressCompany',['as'=>'Api.Order.getExpressCompany','uses'=>'OtherController@getExpressCompany']);
            Route::get('getShopList',['as'=>'Api.Order.getShopList','uses'=>'OtherController@getShopList']);
            Route::get('getShopDetail',['as'=>'Api.Order.getShopDetail','uses'=>'OtherController@getShopDetail']);
            Route::get('gerAboutUs',['as'=>'Api.Order.gerAboutUs','uses'=>'OtherController@gerAboutUs']);
            Route::get('getAdvertImg',['as'=>'Api.Order.getAdvertImg','uses'=>'OtherController@getAdvertImg']);
            Route::get('getServiceAgreement',['as'=>'Api.Order.getServiceAgreement','uses'=>'OtherController@getServiceAgreement']);
            Route::get('getGroupRule',['as'=>'Api.Order.getGroupRule','uses'=>'OtherController@getGroupRule']);
            Route::get('searchSomething',['as'=>'Api.Other.searchSomething','uses'=>'OtherController@searchSomething']);
            Route::get('getSearchKeyword',['as'=>'Api.Other.getSearchKeyword','uses'=>'OtherController@getSearchKeyword']);
            Route::post('delMykeywordRecord',['as'=>'Api.Other.delMykeywordRecord','uses'=>'OtherController@delMykeywordRecord']);
        });

        Route::group(['prefix' => 'ucenter'],function(){
            Route::get('getUserInfo',['as'=>'Api.UCenter.getUserInfo','uses'=>'UCenterController@getUserInfo']);
            Route::get('getDistance',['as'=>'Api.UCenter.getDistance','uses'=>'UCenterController@getDistance']);
            Route::post('newShippingAddress',['as'=>'Api.UCenter.newShippingAddress','uses'=>'UCenterController@newShippingAddress']);
            Route::get('getShippingAddress',['as'=>'Api.UCenter.getShippingAddress','uses'=>'UCenterController@getShippingAddress']);
            Route::post('deleteShippingAddress',['as'=>'Api.UCenter.deleteShippingAddress','uses'=>'UCenterController@deleteShippingAddress']);

            Route::get('getUserIntegralList',['as'=>'Api.UCenter.getUserIntegralList','uses'=>'UCenterController@getUserIntegralList']);
            Route::get('getCouponList',['as'=>'Api.UCenter.getCouponList','uses'=>'UCenterController@getCouponList']);
            Route::post('couponReceive',['as'=>'Api.UCenter.couponReceive','uses'=>'UCenterController@couponReceive']);
            Route::get('getUserCoupon',['as'=>'Api.UCenter.getUserCoupon','uses'=>'UCenterController@getUserCoupon']);
            Route::get('getHomeCoupon',['as'=>'Api.UCenter.getHomeCoupon','uses'=>'UCenterController@getHomeCoupon']);
            Route::get('getCouponDetail',['as'=>'Api.UCenter.getCouponDetail','uses'=>'UCenterController@getCouponDetail']);
            Route::get('scanningIntegral',['as'=>'Api.UCenter.scanningIntegral','uses'=>'UCenterController@scanningIntegral']);


        });

        Route::group(['prefix' => 'goods'],function(){
            Route::get('getGoodsClassify',['as'=>'Api.Goods.getGoodsClassify','uses'=>'GoodsController@getGoodsClassify']);
            Route::get('getGoodsList',['as'=>'Api.Goods.getGoodsList','uses'=>'GoodsController@getGoodsList']);
            Route::get('getGoodsDetails',['as'=>'Api.Goods.getGoodsDetails','uses'=>'GoodsController@getGoodsDetails']);
            Route::post('addShopCart',['as'=>'Api.Goods.addShopCart','uses'=>'GoodsController@addShopCart']);
            Route::get('getShopCart',['as'=>'Api.Goods.getShopCart','uses'=>'GoodsController@getShopCart']);
            Route::post('deleteShopCart',['as'=>'Api.Goods.deleteShopCart','uses'=>'GoodsController@deleteShopCart']);
            Route::post('userComment',['as'=>'Api.Goods.userComment','uses'=>'GoodsController@userComment']);
            Route::get('getUserComment',['as'=>'Api.Goods.getUserComment','uses'=>'GoodsController@getUserComment']);
            Route::get('getRecommendGoodsList',['as'=>'Api.Goods.getRecommendGoodsList','uses'=>'GoodsController@getRecommendGoodsList']);
            Route::get('generateShareQrCode',['as'=>'Api.Goods.generateShareQrCode','uses'=>'GoodsController@generateShareQrCode']);
            //获取首页专栏商品
            Route::get('getSectionGoodsList',['as'=>'Api.Goods.getSectionGoodsList','uses'=>'GoodsController@getSectionGoodsList']);
            Route::get('getSectionClassifyList',['as'=>'Api.Goods.getSectionClassifyList','uses'=>'GoodsController@getSectionClassifyList']);
            Route::get('getSectionClassifyTwoList',['as'=>'Api.Goods.getSectionClassifyTwoList','uses'=>'GoodsController@getSectionClassifyTwoList']);
            Route::get('getGoodsListByClassifyId',['as'=>'Api.Goods.getGoodsListByClassifyId','uses'=>'GoodsController@getGoodsListByClassifyId']);
        });

        Route::group(['prefix' => 'order'],function(){
            Route::post('buildOrder',['as'=>'Api.Order.buildOrder','uses'=>'OrderController@buildOrder']);
            Route::get('getOrders',['as'=>'Api.Order.getOrders','uses'=>'OrderController@getOrders']);
            Route::get('getUserAllOrders',['as'=>'Api.Order.getUserAllOrders','uses'=>'OrderController@getUserAllOrders']);
            Route::post('cancelOrder',['as'=>'Api.Order.cancelOrder','uses'=>'OrderController@cancelOrder']);
            Route::post('useCoupon',['as'=>'Api.Order.useCoupon','uses'=>'OrderController@useCoupon']);
            Route::post('submitOrder',['as'=>'Api.Order.submitOrder','uses'=>'OrderController@submitOrder']);
            Route::post('confirmReceipt',['as'=>'Api.Order.confirmReceipt','uses'=>'OrderController@confirmReceipt']);
            Route::post('setShopToOrder',['as'=>'Api.Order.setShopToOrder','uses'=>'OrderController@setShopToOrder']);
            Route::post('useCoupon',['as'=>'Api.Order.useCoupon','uses'=>'OrderController@useCoupon']);
            Route::post('changePayType',['as'=>'Api.Order.changePayType','uses'=>'OrderController@changePayType']);
            Route::any('getProvinceExpressFee',['as'=>'Api.Order.getProvinceExpressFee','uses'=>'OrderController@getProvinceExpressFee']);
            Route::post('orderRefundApply',['as'=>'Api.Order.orderRefundApply','uses'=>'OrderController@orderRefundApply']);
            Route::post('orderRefundExpress',['as'=>'Api.Order.orderRefundExpress','uses'=>'OrderController@orderRefundExpress']);
            Route::get('getReturnInfo',['as'=>'Api.Order.getReturnInfo','uses'=>'OrderController@getReturnInfo']);

        });

        Route::group(['prefix' => 'payment'],function(){
            Route::post('weChatPayment',['as'=>'Api.Payment.weChatPayment','uses'=>'PaymentController@weChatPayment']);
            Route::any('WeChatPayCallback',['as'=>'Api.Payment.WeChatPayCallback','uses'=>'PaymentController@WeChatPayCallback']);
            Route::post('balancePayment',['as'=>'Api.Coupon.balancePayment','uses'=>'PaymentController@balancePayment']);
            Route::get('checkMyBalance',['as'=>'Api.Coupon.checkMyBalance','uses'=>'PaymentController@checkMyBalance']);
        });

        Route::group(['prefix' => 'coupon'],function(){
            Route::get('getCouponList',['as'=>'Api.Coupon.getCouponList','uses'=>'CouponController@getCouponList']);
            Route::get('getHomeCoupon',['as'=>'Api.Coupon.getHomeCoupon','uses'=>'CouponController@getHomeCoupon']);
            Route::get('getCouponDetail',['as'=>'Api.Coupon.getCouponDetail','uses'=>'CouponController@getCouponDetail']);
            Route::post('couponReceive',['as'=>'Api.Coupon.couponReceive','uses'=>'CouponController@couponReceive']);
            Route::get('getUserCoupon',['as'=>'Api.Coupon.getUserCoupon','uses'=>'CouponController@getUserCoupon']);

        });

        Route::group(['prefix' => 'refund'],function(){
            Route::get('refund',['as'=>'Api.Refund.refund','uses'=>'RefundController@refund']);
        });

        Route::group(['prefix' => 'activity'],function(){
            Route::get('getActivityGroupList',['as'=>'Api.Activity.getActivityGroupList','uses'=>'ActivityController@getActivityGroupList']);
            Route::get('getActivityGroupDetail',['as'=>'Api.Activity.getActivityGroupDetail','uses'=>'ActivityController@getActivityGroupDetail']);
            Route::get('getInitiateGroupList',['as'=>'Api.Activity.getInitiateGroupList','uses'=>'ActivityController@getInitiateGroupList']);
            Route::get('getPayGroupAdd',['as'=>'Api.Activity.getPayGroupAdd','uses'=>'ActivityController@getPayGroupAdd']);
            Route::get('generateShareQrCode',['as'=>'Api.Activity.generateShareQrCode','uses'=>'ActivityController@generateShareQrCode']);
            Route::get('getUserGroupStatus',['as'=>'Api.Activity.getUserGroupStatus','uses'=>'ActivityController@getUserGroupStatus']);

        });

        //syncStock
        Route::group(['prefix' => 'sync'],function(){
            Route::get('syncStock',['as'=>'Api.Sync.syncStock','uses'=>'SyncController@syncStock']);
        });

    });

    Route::post('admin/setDistributionRule',['as'=>'Distribution.Admin.setDistributionRule','uses'=>'DistributionController@setDistributionRule']);
    Route::get('admin/setDistributionRulePage',['as'=>'Distribution.Admin.setDistributionRulePage','uses'=>'DistributionController@setDistributionRulePage']);
    Route::get('admin/getUserRebate',['as'=>'Distribution.Admin.getUserRebate','uses'=>'DistributionController@getUserRebate']);
    Route::post('admin/exchangeRebate',['as'=>'Distribution.Admin.exchangeRebate','uses'=>'DistributionController@exchangeRebate']);
    Route::get('admin/getDistributionLeader',['as'=>'Distribution.Admin.getDistributionLeader','uses'=>'DistributionController@getDistributionLeader']);
    Route::post('admin/addDistributionLeader',['as'=>'Distribution.Admin.addDistributionLeader','uses'=>'DistributionController@addDistributionLeader']);
    Route::post('admin/delDistributionLeader',['as'=>'Distribution.Admin.delDistributionLeader','uses'=>'DistributionController@delDistributionLeader']);
    Route::get('api/getMyRebate',['as'=>'Distribution.Api.getMyRebate','uses'=>'DistributionController@getMyRebate']);
    Route::get('api/getMyRebateRecord',['as'=>'Distribution.Api.getMyRebateRecord','uses'=>'DistributionController@getMyRebateRecord']);
});
